

import aiosqlite
from config import DATABASE_FILE


async def get_db_connection():
    """获取异步数据库连接"""
    conn = await aiosqlite.connect(DATABASE_FILE)
    conn.row_factory = aiosqlite.Row  # 使查询结果可以通过列名访问
    return conn

